	<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
	<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'reader_menu.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
    <a href="menu/admin_menu.jsp"><h2>点击返回导航页</h2></a>
    <center>
    <h1>读者管理</h1>
    <br/><br/><br/><br/><br/><br/>
  	<table border="1" width="60%"  border="0" cellpadding="3" cellspacing="1" bgcolor="#CBD8AC" style="margin-bottom:8px;margin-top:8px;">
		<tr>
			<th>读者ID</th>
			<th>密码
			<th>姓名</th>
			<th>联系电话</th>
			<th>性别</th>
			<th>已借图书本数</th>
			<th>操作</th>
		</tr>
	<s:iterator value="data" status="st" var="reader">
		<tr align="center" >
			<td><s:property value="#reader.readerId"/></td>
			<td><s:property value="#reader.password"/></td>
			<td><s:property value="#reader.readerName"/></td>
			<td><s:property value="#reader.telephone"/></td>
			<td><s:property value="#reader.sex"/></td>
			<td><s:property value="#reader.numOfBorrow"/></td>
			<td>
				<a href="queryReader!queryReader_byId?reader.id=${reader.id }">修改</a>
				<a href="deleteReader!deleteReader?reader.id=${reader.id }">删除</a>
			</td>
		</tr>
		</s:iterator>
	</table>
	<table  width="60%"  border="0" cellpadding="3" cellspacing="1" style="margin-bottom:8px;margin-top:8px;">
	<tr>
		<td>[<a href="display_Reader!display.action?pageNo=1">首页</a>]
			<c:choose>
				<c:when test="${currentPage>1}">
					[<a href="display_Reader!display.action?pageNo=${currentPage-1}">上一页</a>]
				</c:when>
			</c:choose>
			<c:choose>
				<c:when test="${currentPage<totalPage}">
					[<a href="display_Reader!display.action?pageNo=${currentPage+1}">下一页</a>]
				</c:when>
			</c:choose>
			[<a href="display_Reader!display.action?pageNo=${totalPage}">尾页</a>]
		</td>
		<td align="right"><a href="reader/addReader.jsp">添加读者</a></td>
	</tr>
    </table>
    </center>
  </body>
</html>
